<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>

<script src="../vue/Vue.js"></script>
<script src="../vue/axios.js"></script>
<script type="text/javascript">
	$(function() {
		$("#header").load("/zlz/header.html");
	})
</script>
</head>
<body>
	<div id="app">
		<div id="header"></div>

		联系电话：<input type="text" v-model="phone" /><br> mail：<input
			type="text" v-model="mail" /><br> 场馆状态：<input type="text"
			v-model="gymInfoStatus" />(0不开)<br>

		<!-- 
        	作者：offline
        	时间：2020-06-12
			非必要条件
        -->

		详情照片：
		<!-- form表单上传文件 method必须是post  enctype必须是multipart/form-data -->
		<form action="/gymInfo/upload" method="post"
			enctype="multipart/form-data">
			<input type="file" name="gymImage"><br> <input
				type="submit" value="上传">
		</form>
		<button @click="submitt">提交</button>
	</div>
	<script type="text/javascript">
		
		new Vue({
			el:"#app",
			data:{
				place:"",
				gymName:"",
				phone:"",
				mail:"",
				gymInfoStatus:""
			},
			methods:{
				submitt:function(){
					var params = new URLSearchParams();
					params.append("mail",this.mail);
					params.append("gymInfoStatus",this.gymInfoStatus);
				
					axios.post(
						"/gymInfo/updateGymInfo",
						//{"uname":this.uname,"pwd":this.pwd} //后台用@RequestBody接收数据
						 //{"place":this.place,"gymName":this.gymName,"phone":this.phone,"mail":this.mail,"gymInfoStatus":this.gymInfoStatus}
						params
					).then(res => {		//res返回的结果
						//console.info(res);
						if(res==1){
							//成功
							alert("success");
						}else {
							alert("fail");
						}
					});
				}
			}
		});
	</script>
</body>

</html>
